// 用户模块
import { makeAutoObservable } from "mobx"
import { axios_request } from '@/utils'

class UserStore {
  userInfo = {}
  list = []
  total = 0
  constructor() {
    makeAutoObservable(this)
  }
  getUserInfo = async() => {
    const res = await axios_request.get('profile')
    this.userInfo = res.data

  }
  getList = async() => {
    const res = await axios_request.get('users')
    this.list = res.data.list
    this.total = res.data.total
  }
}

export default UserStore